

export default function(status) {

    const {
        editTable,
        button
    } = this.props;

    if(status) {
        let allTableList = editTable.getAllRows('ncc60071025list');
        
        let notHis = [];
        let withHis = [];

        allTableList.map((item, index) => {
            
            if(!item.values['pk_psndoc.ishiskeypsn'].value) {
                notHis.push({
                    index: index,
                    data: item
                });
            }
            withHis.push({
                index: index,
                data: item
            });
        });

        button.setButtonDisabled({
            BatchEdit: false
        });

        this.setState({
            selectedRows: notHis,
            selectedRowsWithHis: withHis
        });
    }
    else {
        this.setState({
            selectedRows: [],
            withHis: []
        });
        button.setButtonDisabled({
            BatchEdit: true
        });
    }
}